<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<title>API: resize   resize-constrain.js  (YUI Library)</title>

	<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css" />
	<link rel="stylesheet" type="text/css" href="assets/api.css" />

    <script type="text/javascript" src="assets/api-js"></script>
    <script type="text/javascript" src="assets/ac-js"></script>
</head>

<body id="yahoo-com">

<div id="doc3" class="yui-t2">
	<div id="hd">
        <h1><a href="http://developer.yahoo.com/yui/" title="Yahoo! UI Library">Yahoo! UI Library</a></h1>
        <h3>resize&nbsp; <span class="subtitle">3.3.0</span></h3>
        <a href="./index.html" title="Yahoo! UI Library">Yahoo! UI Library</a> 
            &gt; <a href="./module_resize.html" title="resize">resize</a>
                
                 &gt; resize-constrain.js (source view) 
        <form onsubmit="return false">
            <div id="propertysearch">
                Search: <input autocomplete="off" id="searchinput" />
                <div id="searchresults">
                    &nbsp;
                </div>
            </div>
        </form>
	</div>

	<div id="bd">
		<div id="yui-main">
			<div class="yui-b">
            <form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
                <fieldset>
                    <legend>Filters</legend>
                <span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
                <span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
                <span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
                </fieldset>
            </form>

                    <div id="srcout">
                        <style>
                            #doc3 .classopts { display:none; }
                        </style>
                        <div class="highlight"><pre><span class="kd">var</span> <span class="nx">Lang</span> <span class="o">=</span> <span class="nx">Y</span><span class="p">.</span><span class="nx">Lang</span><span class="p">,</span>
	<span class="nx">isBoolean</span> <span class="o">=</span> <span class="nx">Lang</span><span class="p">.</span><span class="nx">isBoolean</span><span class="p">,</span>
	<span class="nx">isNumber</span> <span class="o">=</span> <span class="nx">Lang</span><span class="p">.</span><span class="nx">isNumber</span><span class="p">,</span>
	<span class="nx">isString</span> <span class="o">=</span> <span class="nx">Lang</span><span class="p">.</span><span class="nx">isString</span><span class="p">,</span>
	<span class="nx">capitalize</span> <span class="o">=</span> <span class="nx">Y</span><span class="p">.</span><span class="nx">Resize</span><span class="p">.</span><span class="nx">capitalize</span><span class="p">,</span>

	<span class="nx">isNode</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">v</span><span class="p">)</span> <span class="p">{</span>
		<span class="k">return</span> <span class="p">(</span><span class="nx">v</span> <span class="k">instanceof</span> <span class="nx">Y</span><span class="p">.</span><span class="nx">Node</span><span class="p">);</span>
	<span class="p">},</span>

	<span class="nx">toNumber</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">num</span><span class="p">)</span> <span class="p">{</span>
		<span class="k">return</span> <span class="nb">parseFloat</span><span class="p">(</span><span class="nx">num</span><span class="p">)</span> <span class="o">||</span> <span class="mi">0</span><span class="p">;</span>
	<span class="p">},</span>

	<span class="nx">BORDER_BOTTOM_WIDTH</span> <span class="o">=</span> <span class="s1">&#39;borderBottomWidth&#39;</span><span class="p">,</span>
	<span class="nx">BORDER_LEFT_WIDTH</span> <span class="o">=</span> <span class="s1">&#39;borderLeftWidth&#39;</span><span class="p">,</span>
	<span class="nx">BORDER_RIGHT_WIDTH</span> <span class="o">=</span> <span class="s1">&#39;borderRightWidth&#39;</span><span class="p">,</span>
	<span class="nx">BORDER_TOP_WIDTH</span> <span class="o">=</span> <span class="s1">&#39;borderTopWidth&#39;</span><span class="p">,</span>
	<span class="nx">BORDER</span> <span class="o">=</span> <span class="s1">&#39;border&#39;</span><span class="p">,</span>
	<span class="nx">BOTTOM</span> <span class="o">=</span> <span class="s1">&#39;bottom&#39;</span><span class="p">,</span>
	<span class="nx">CON</span> <span class="o">=</span> <span class="s1">&#39;con&#39;</span><span class="p">,</span>
	<span class="nx">CONSTRAIN</span> <span class="o">=</span> <span class="s1">&#39;constrain&#39;</span><span class="p">,</span>
	<span class="nx">HOST</span> <span class="o">=</span> <span class="s1">&#39;host&#39;</span><span class="p">,</span>
	<span class="nx">LEFT</span> <span class="o">=</span> <span class="s1">&#39;left&#39;</span><span class="p">,</span>
	<span class="nx">MAX_HEIGHT</span> <span class="o">=</span> <span class="s1">&#39;maxHeight&#39;</span><span class="p">,</span>
	<span class="nx">MAX_WIDTH</span> <span class="o">=</span> <span class="s1">&#39;maxWidth&#39;</span><span class="p">,</span>
	<span class="nx">MIN_HEIGHT</span> <span class="o">=</span> <span class="s1">&#39;minHeight&#39;</span><span class="p">,</span>
	<span class="nx">MIN_WIDTH</span> <span class="o">=</span> <span class="s1">&#39;minWidth&#39;</span><span class="p">,</span>
	<span class="nx">NODE</span> <span class="o">=</span> <span class="s1">&#39;node&#39;</span><span class="p">,</span>
	<span class="nx">OFFSET_HEIGHT</span> <span class="o">=</span> <span class="s1">&#39;offsetHeight&#39;</span><span class="p">,</span>
	<span class="nx">OFFSET_WIDTH</span> <span class="o">=</span> <span class="s1">&#39;offsetWidth&#39;</span><span class="p">,</span>
	<span class="nx">PRESEVE_RATIO</span> <span class="o">=</span> <span class="s1">&#39;preserveRatio&#39;</span><span class="p">,</span>
	<span class="nx">REGION</span> <span class="o">=</span> <span class="s1">&#39;region&#39;</span><span class="p">,</span>
	<span class="nx">RESIZE_CONTRAINED</span> <span class="o">=</span> <span class="s1">&#39;resizeConstrained&#39;</span><span class="p">,</span>
	<span class="nx">RIGHT</span> <span class="o">=</span> <span class="s1">&#39;right&#39;</span><span class="p">,</span>
	<span class="nx">TICK_X</span> <span class="o">=</span> <span class="s1">&#39;tickX&#39;</span><span class="p">,</span>
	<span class="nx">TICK_Y</span> <span class="o">=</span> <span class="s1">&#39;tickY&#39;</span><span class="p">,</span>
	<span class="nx">TOP</span> <span class="o">=</span> <span class="s1">&#39;top&#39;</span><span class="p">,</span>
	<span class="nx">WIDTH</span> <span class="o">=</span> <span class="s1">&#39;width&#39;</span><span class="p">,</span>
	<span class="nx">VIEW</span> <span class="o">=</span> <span class="s1">&#39;view&#39;</span><span class="p">,</span>
	<span class="nx">VIEWPORT_REGION</span> <span class="o">=</span> <span class="s1">&#39;viewportRegion&#39;</span><span class="p">;</span>

<span class="kd">function</span> <span class="nx">ResizeConstrained</span><span class="p">()</span> <span class="p">{</span>
	<span class="nx">ResizeConstrained</span><span class="p">.</span><span class="nx">superclass</span><span class="p">.</span><span class="nx">constructor</span><span class="p">.</span><span class="nx">apply</span><span class="p">(</span><span class="k">this</span><span class="p">,</span> <span class="nx">arguments</span><span class="p">);</span>
<span class="p">}</span>

<span class="nx">Y</span><span class="p">.</span><span class="nx">mix</span><span class="p">(</span><span class="nx">ResizeConstrained</span><span class="p">,</span> <span class="p">{</span>
	<span class="nx">NAME</span><span class="o">:</span> <span class="nx">RESIZE_CONTRAINED</span><span class="p">,</span>

	<span class="nx">NS</span><span class="o">:</span> <span class="nx">CON</span><span class="p">,</span>

	<span class="nx">ATTRS</span><span class="o">:</span> <span class="p">{</span>
        <span class="cm">/**</span>
<span class="cm">        * Will attempt to constrain the resize node to the boundaries. Arguments:&lt;br&gt;</span>
<span class="cm">        * &#39;view&#39;: Contrain to Viewport&lt;br&gt;</span>
<span class="cm">        * &#39;#selector_string&#39;: Constrain to this node&lt;br&gt;</span>
<span class="cm">        * &#39;{Region Object}&#39;: An Object Literal containing a valid region (top, right, bottom, left) of page positions</span>
<span class="cm">        *</span>
<span class="cm">        * @attribute constrain</span>
<span class="cm">        * @type {String/Object/Node}</span>
<span class="cm">        */</span>
		<span class="nx">constrain</span><span class="o">:</span> <span class="p">{</span>
			<span class="nx">setter</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">v</span><span class="p">)</span> <span class="p">{</span>
				<span class="k">if</span> <span class="p">(</span><span class="nx">v</span> <span class="o">&amp;&amp;</span> <span class="p">(</span><span class="nx">isNode</span><span class="p">(</span><span class="nx">v</span><span class="p">)</span> <span class="o">||</span> <span class="nx">isString</span><span class="p">(</span><span class="nx">v</span><span class="p">)</span> <span class="o">||</span> <span class="nx">v</span><span class="p">.</span><span class="nx">nodeType</span><span class="p">))</span> <span class="p">{</span>
					<span class="nx">v</span> <span class="o">=</span> <span class="nx">Y</span><span class="p">.</span><span class="nx">one</span><span class="p">(</span><span class="nx">v</span><span class="p">);</span>
				<span class="p">}</span>

				<span class="k">return</span> <span class="nx">v</span><span class="p">;</span>
			<span class="p">}</span>
		<span class="p">},</span>

        <span class="cm">/**</span>
<span class="cm">         * The minimum height of the element</span>
<span class="cm">         *</span>
<span class="cm">         * @attribute minHeight</span>
<span class="cm">         * @default 15</span>
<span class="cm">         * @type Number</span>
<span class="cm">         */</span>
		<span class="nx">minHeight</span><span class="o">:</span> <span class="p">{</span>
			<span class="nx">value</span><span class="o">:</span> <span class="mi">15</span><span class="p">,</span>
			<span class="nx">validator</span><span class="o">:</span> <span class="nx">isNumber</span>
		<span class="p">},</span>

        <span class="cm">/**</span>
<span class="cm">         * The minimum width of the element</span>
<span class="cm">         *</span>
<span class="cm">         * @attribute minWidth</span>
<span class="cm">         * @default 15</span>
<span class="cm">         * @type Number</span>
<span class="cm">         */</span>
		<span class="nx">minWidth</span><span class="o">:</span> <span class="p">{</span>
			<span class="nx">value</span><span class="o">:</span> <span class="mi">15</span><span class="p">,</span>
			<span class="nx">validator</span><span class="o">:</span> <span class="nx">isNumber</span>
		<span class="p">},</span>

        <span class="cm">/**</span>
<span class="cm">         * The maximum height of the element</span>
<span class="cm">         *</span>
<span class="cm">         * @attribute maxHeight</span>
<span class="cm">         * @default Infinity</span>
<span class="cm">         * @type Number</span>
<span class="cm">         */</span>
		<span class="nx">maxHeight</span><span class="o">:</span> <span class="p">{</span>
			<span class="nx">value</span><span class="o">:</span> <span class="kc">Infinity</span><span class="p">,</span>
			<span class="nx">validator</span><span class="o">:</span> <span class="nx">isNumber</span>
		<span class="p">},</span>

        <span class="cm">/**</span>
<span class="cm">         * The maximum width of the element</span>
<span class="cm">         *</span>
<span class="cm">         * @attribute maxWidth</span>
<span class="cm">         * @default Infinity</span>
<span class="cm">         * @type Number</span>
<span class="cm">         */</span>
		<span class="nx">maxWidth</span><span class="o">:</span> <span class="p">{</span>
			<span class="nx">value</span><span class="o">:</span> <span class="kc">Infinity</span><span class="p">,</span>
			<span class="nx">validator</span><span class="o">:</span> <span class="nx">isNumber</span>
		<span class="p">},</span>

		<span class="cm">/**</span>
<span class="cm">         * Maintain the element&#39;s ratio when resizing.</span>
<span class="cm">         *</span>
<span class="cm">         * @attribute preserveRatio</span>
<span class="cm">         * @default false</span>
<span class="cm">         * @type boolean</span>
<span class="cm">         */</span>
		<span class="nx">preserveRatio</span><span class="o">:</span> <span class="p">{</span>
			<span class="nx">value</span><span class="o">:</span> <span class="kc">false</span><span class="p">,</span>
			<span class="nx">validator</span><span class="o">:</span> <span class="nx">isBoolean</span>
		<span class="p">},</span>

		<span class="cm">/**</span>
<span class="cm">         * The number of x ticks to span the resize to.</span>
<span class="cm">         *</span>
<span class="cm">         * @attribute tickX</span>
<span class="cm">         * @default false</span>
<span class="cm">         * @type Number | false</span>
<span class="cm">         */</span>
		<span class="nx">tickX</span><span class="o">:</span> <span class="p">{</span>
			<span class="nx">value</span><span class="o">:</span> <span class="kc">false</span>
		<span class="p">},</span>

        <span class="cm">/**</span>
<span class="cm">         * The number of y ticks to span the resize to.</span>
<span class="cm">         *</span>
<span class="cm">         * @attribute tickY</span>
<span class="cm">         * @default false</span>
<span class="cm">         * @type Number | false</span>
<span class="cm">         */</span>
		<span class="nx">tickY</span><span class="o">:</span> <span class="p">{</span>
			<span class="nx">value</span><span class="o">:</span> <span class="kc">false</span>
		<span class="p">}</span>
	<span class="p">}</span>
<span class="p">});</span>

<span class="nx">Y</span><span class="p">.</span><span class="nx">extend</span><span class="p">(</span><span class="nx">ResizeConstrained</span><span class="p">,</span> <span class="nx">Y</span><span class="p">.</span><span class="nx">Plugin</span><span class="p">.</span><span class="nx">Base</span><span class="p">,</span> <span class="p">{</span>
	<span class="cm">/**</span>
<span class="cm">	 * Stores the &lt;code&gt;constrain&lt;/code&gt;</span>
<span class="cm">	 * surrounding information retrieved from</span>
<span class="cm">	 * &lt;a href=&quot;Resize.html#method__getBoxSurroundingInfo&quot;&gt;_getBoxSurroundingInfo&lt;/a&gt;.</span>
<span class="cm">	 *</span>
<span class="cm">	 * @property constrainSurrounding</span>
<span class="cm">	 * @type Object</span>
<span class="cm">	 * @default null</span>
<span class="cm">	 */</span>
	<span class="nx">constrainSurrounding</span><span class="o">:</span> <span class="kc">null</span><span class="p">,</span>

	<span class="nx">initializer</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
		<span class="kd">var</span> <span class="nx">instance</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">host</span> <span class="o">=</span> <span class="nx">instance</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">HOST</span><span class="p">);</span>

		<span class="nx">host</span><span class="p">.</span><span class="nx">delegate</span><span class="p">.</span><span class="nx">dd</span><span class="p">.</span><span class="nx">plug</span><span class="p">(</span>
			<span class="nx">Y</span><span class="p">.</span><span class="nx">Plugin</span><span class="p">.</span><span class="nx">DDConstrained</span><span class="p">,</span>
			<span class="p">{</span>
				<span class="nx">tickX</span><span class="o">:</span> <span class="nx">instance</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">TICK_X</span><span class="p">),</span>
				<span class="nx">tickY</span><span class="o">:</span> <span class="nx">instance</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">TICK_Y</span><span class="p">)</span>
			<span class="p">}</span>
		<span class="p">);</span>

		<span class="nx">host</span><span class="p">.</span><span class="nx">after</span><span class="p">(</span><span class="s1">&#39;resize:align&#39;</span><span class="p">,</span> <span class="nx">Y</span><span class="p">.</span><span class="nx">bind</span><span class="p">(</span><span class="nx">instance</span><span class="p">.</span><span class="nx">_handleResizeAlignEvent</span><span class="p">,</span> <span class="nx">instance</span><span class="p">));</span>
		<span class="nx">host</span><span class="p">.</span><span class="nx">on</span><span class="p">(</span><span class="s1">&#39;resize:start&#39;</span><span class="p">,</span> <span class="nx">Y</span><span class="p">.</span><span class="nx">bind</span><span class="p">(</span><span class="nx">instance</span><span class="p">.</span><span class="nx">_handleResizeStartEvent</span><span class="p">,</span> <span class="nx">instance</span><span class="p">));</span>
	<span class="p">},</span>

	<span class="cm">/**</span>
<span class="cm">     * Helper method to update the current values on</span>
<span class="cm">     * &lt;a href=&quot;Resize.html#property_info&quot;&gt;info&lt;/a&gt; to respect the</span>
<span class="cm">     * constrain node.</span>
<span class="cm">	 *</span>
<span class="cm">	 * @method _checkConstrain</span>
<span class="cm">	 * @param {String} axis &#39;top&#39; or &#39;left&#39;</span>
<span class="cm">	 * @param {String} axisConstrain &#39;bottom&#39; or &#39;right&#39;</span>
<span class="cm">	 * @param {String} offset &#39;offsetHeight&#39; or &#39;offsetWidth&#39;</span>
<span class="cm">	 * @protected</span>
<span class="cm">	 */</span>
	<span class="nx">_checkConstrain</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">axis</span><span class="p">,</span> <span class="nx">axisConstrain</span><span class="p">,</span> <span class="nx">offset</span><span class="p">)</span> <span class="p">{</span>
		<span class="kd">var</span> <span class="nx">instance</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">point1</span><span class="p">,</span>
			<span class="nx">point1Constrain</span><span class="p">,</span>
			<span class="nx">point2</span><span class="p">,</span>
			<span class="nx">point2Constrain</span><span class="p">,</span>
			<span class="nx">host</span> <span class="o">=</span> <span class="nx">instance</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">HOST</span><span class="p">),</span>
			<span class="nx">info</span> <span class="o">=</span> <span class="nx">host</span><span class="p">.</span><span class="nx">info</span><span class="p">,</span>
			<span class="nx">constrainBorders</span> <span class="o">=</span> <span class="nx">instance</span><span class="p">.</span><span class="nx">constrainSurrounding</span><span class="p">.</span><span class="nx">border</span><span class="p">,</span>
			<span class="nx">region</span> <span class="o">=</span> <span class="nx">instance</span><span class="p">.</span><span class="nx">_getConstrainRegion</span><span class="p">();</span>

		<span class="k">if</span> <span class="p">(</span><span class="nx">region</span><span class="p">)</span> <span class="p">{</span>
			<span class="nx">point1</span> <span class="o">=</span> <span class="nx">info</span><span class="p">[</span><span class="nx">axis</span><span class="p">]</span> <span class="o">+</span> <span class="nx">info</span><span class="p">[</span><span class="nx">offset</span><span class="p">];</span>
			<span class="nx">point1Constrain</span> <span class="o">=</span> <span class="nx">region</span><span class="p">[</span><span class="nx">axisConstrain</span><span class="p">]</span> <span class="o">-</span> <span class="nx">toNumber</span><span class="p">(</span><span class="nx">constrainBorders</span><span class="p">[</span><span class="nx">capitalize</span><span class="p">(</span><span class="nx">BORDER</span><span class="p">,</span> <span class="nx">axisConstrain</span><span class="p">,</span> <span class="nx">WIDTH</span><span class="p">)]);</span>

			<span class="k">if</span> <span class="p">(</span><span class="nx">point1</span> <span class="o">&gt;=</span> <span class="nx">point1Constrain</span><span class="p">)</span> <span class="p">{</span>
				<span class="nx">info</span><span class="p">[</span><span class="nx">offset</span><span class="p">]</span> <span class="o">-=</span> <span class="p">(</span><span class="nx">point1</span> <span class="o">-</span> <span class="nx">point1Constrain</span><span class="p">);</span>
			<span class="p">}</span>

			<span class="nx">point2</span> <span class="o">=</span> <span class="nx">info</span><span class="p">[</span><span class="nx">axis</span><span class="p">];</span>
			<span class="nx">point2Constrain</span> <span class="o">=</span> <span class="nx">region</span><span class="p">[</span><span class="nx">axis</span><span class="p">]</span> <span class="o">+</span> <span class="nx">toNumber</span><span class="p">(</span><span class="nx">constrainBorders</span><span class="p">[</span><span class="nx">capitalize</span><span class="p">(</span><span class="nx">BORDER</span><span class="p">,</span> <span class="nx">axis</span><span class="p">,</span> <span class="nx">WIDTH</span><span class="p">)]);</span>

			<span class="k">if</span> <span class="p">(</span><span class="nx">point2</span> <span class="o">&lt;=</span> <span class="nx">point2Constrain</span><span class="p">)</span> <span class="p">{</span>
				<span class="nx">info</span><span class="p">[</span><span class="nx">axis</span><span class="p">]</span> <span class="o">+=</span> <span class="p">(</span><span class="nx">point2Constrain</span> <span class="o">-</span> <span class="nx">point2</span><span class="p">);</span>
				<span class="nx">info</span><span class="p">[</span><span class="nx">offset</span><span class="p">]</span> <span class="o">-=</span> <span class="p">(</span><span class="nx">point2Constrain</span> <span class="o">-</span> <span class="nx">point2</span><span class="p">);</span>
			<span class="p">}</span>
		<span class="p">}</span>
	<span class="p">},</span>

    <span class="cm">/**</span>
<span class="cm">     * Update the current values on &lt;a href=&quot;Resize.html#property_info&quot;&gt;info&lt;/a&gt;</span>
<span class="cm">     * to respect the maxHeight and minHeight.</span>
<span class="cm">     *</span>
<span class="cm">     * @method _checkHeight</span>
<span class="cm">     * @protected</span>
<span class="cm">     */</span>
	<span class="nx">_checkHeight</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
		<span class="kd">var</span> <span class="nx">instance</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">host</span> <span class="o">=</span> <span class="nx">instance</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">HOST</span><span class="p">),</span>
			<span class="nx">info</span> <span class="o">=</span> <span class="nx">host</span><span class="p">.</span><span class="nx">info</span><span class="p">,</span>
			<span class="nx">maxHeight</span> <span class="o">=</span> <span class="p">(</span><span class="nx">instance</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">MAX_HEIGHT</span><span class="p">)</span> <span class="o">+</span> <span class="nx">host</span><span class="p">.</span><span class="nx">totalVSurrounding</span><span class="p">),</span>
			<span class="nx">minHeight</span> <span class="o">=</span> <span class="p">(</span><span class="nx">instance</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">MIN_HEIGHT</span><span class="p">)</span> <span class="o">+</span> <span class="nx">host</span><span class="p">.</span><span class="nx">totalVSurrounding</span><span class="p">);</span>

		<span class="nx">instance</span><span class="p">.</span><span class="nx">_checkConstrain</span><span class="p">(</span><span class="nx">TOP</span><span class="p">,</span> <span class="nx">BOTTOM</span><span class="p">,</span> <span class="nx">OFFSET_HEIGHT</span><span class="p">);</span>

		<span class="k">if</span> <span class="p">(</span><span class="nx">info</span><span class="p">.</span><span class="nx">offsetHeight</span> <span class="o">&gt;</span> <span class="nx">maxHeight</span><span class="p">)</span> <span class="p">{</span>
			<span class="nx">host</span><span class="p">.</span><span class="nx">_checkSize</span><span class="p">(</span><span class="nx">OFFSET_HEIGHT</span><span class="p">,</span> <span class="nx">maxHeight</span><span class="p">);</span>
		<span class="p">}</span>

		<span class="k">if</span> <span class="p">(</span><span class="nx">info</span><span class="p">.</span><span class="nx">offsetHeight</span> <span class="o">&lt;</span> <span class="nx">minHeight</span><span class="p">)</span> <span class="p">{</span>
			<span class="nx">host</span><span class="p">.</span><span class="nx">_checkSize</span><span class="p">(</span><span class="nx">OFFSET_HEIGHT</span><span class="p">,</span> <span class="nx">minHeight</span><span class="p">);</span>
		<span class="p">}</span>
	<span class="p">},</span>

    <span class="cm">/**</span>
<span class="cm">     * Update the current values on &lt;a href=&quot;Resize.html#property_info&quot;&gt;info&lt;/a&gt;</span>
<span class="cm">     * calculating the correct ratio for the other values.</span>
<span class="cm">     *</span>
<span class="cm">     * @method _checkRatio</span>
<span class="cm">     * @protected</span>
<span class="cm">     */</span>
	<span class="nx">_checkRatio</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
		<span class="kd">var</span> <span class="nx">instance</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">host</span> <span class="o">=</span> <span class="nx">instance</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">HOST</span><span class="p">),</span>
			<span class="nx">info</span> <span class="o">=</span> <span class="nx">host</span><span class="p">.</span><span class="nx">info</span><span class="p">,</span>
			<span class="nx">originalInfo</span> <span class="o">=</span> <span class="nx">host</span><span class="p">.</span><span class="nx">originalInfo</span><span class="p">,</span>
			<span class="nx">oWidth</span> <span class="o">=</span> <span class="nx">originalInfo</span><span class="p">.</span><span class="nx">offsetWidth</span><span class="p">,</span>
			<span class="nx">oHeight</span> <span class="o">=</span> <span class="nx">originalInfo</span><span class="p">.</span><span class="nx">offsetHeight</span><span class="p">,</span>
			<span class="nx">oTop</span> <span class="o">=</span> <span class="nx">originalInfo</span><span class="p">.</span><span class="nx">top</span><span class="p">,</span>
			<span class="nx">oLeft</span> <span class="o">=</span> <span class="nx">originalInfo</span><span class="p">.</span><span class="nx">left</span><span class="p">,</span>
			<span class="nx">oBottom</span> <span class="o">=</span> <span class="nx">originalInfo</span><span class="p">.</span><span class="nx">bottom</span><span class="p">,</span>
			<span class="nx">oRight</span> <span class="o">=</span> <span class="nx">originalInfo</span><span class="p">.</span><span class="nx">right</span><span class="p">,</span>
			<span class="c1">// wRatio/hRatio functions keep the ratio information always synced with the current info information</span>
			<span class="c1">// RETURN: percentage how much width/height has changed from the original width/height</span>
			<span class="nx">wRatio</span> <span class="o">=</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
				<span class="k">return</span> <span class="p">(</span><span class="nx">info</span><span class="p">.</span><span class="nx">offsetWidth</span><span class="o">/</span><span class="nx">oWidth</span><span class="p">);</span>
			<span class="p">},</span>
			<span class="nx">hRatio</span> <span class="o">=</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
				<span class="k">return</span> <span class="p">(</span><span class="nx">info</span><span class="p">.</span><span class="nx">offsetHeight</span><span class="o">/</span><span class="nx">oHeight</span><span class="p">);</span>
			<span class="p">},</span>
			<span class="nx">isClosestToHeight</span> <span class="o">=</span> <span class="nx">host</span><span class="p">.</span><span class="nx">changeHeightHandles</span><span class="p">,</span>
			<span class="nx">bottomDiff</span><span class="p">,</span>
			<span class="nx">constrainBorders</span><span class="p">,</span>
			<span class="nx">constrainRegion</span><span class="p">,</span>
			<span class="nx">leftDiff</span><span class="p">,</span>
			<span class="nx">rightDiff</span><span class="p">,</span>
			<span class="nx">topDiff</span><span class="p">;</span>

		<span class="c1">// check whether the resizable node is closest to height or not</span>
		<span class="k">if</span> <span class="p">(</span><span class="nx">instance</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">CONSTRAIN</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="nx">host</span><span class="p">.</span><span class="nx">changeHeightHandles</span> <span class="o">&amp;&amp;</span> <span class="nx">host</span><span class="p">.</span><span class="nx">changeWidthHandles</span><span class="p">)</span> <span class="p">{</span>
			<span class="nx">constrainRegion</span> <span class="o">=</span> <span class="nx">instance</span><span class="p">.</span><span class="nx">_getConstrainRegion</span><span class="p">();</span>
			<span class="nx">constrainBorders</span> <span class="o">=</span> <span class="nx">instance</span><span class="p">.</span><span class="nx">constrainSurrounding</span><span class="p">.</span><span class="nx">border</span><span class="p">;</span>
			<span class="nx">bottomDiff</span> <span class="o">=</span> <span class="p">(</span><span class="nx">constrainRegion</span><span class="p">.</span><span class="nx">bottom</span> <span class="o">-</span> <span class="nx">toNumber</span><span class="p">(</span><span class="nx">constrainBorders</span><span class="p">[</span><span class="nx">BORDER_BOTTOM_WIDTH</span><span class="p">]))</span> <span class="o">-</span> <span class="nx">oBottom</span><span class="p">;</span>
			<span class="nx">leftDiff</span> <span class="o">=</span> <span class="nx">oLeft</span> <span class="o">-</span> <span class="p">(</span><span class="nx">constrainRegion</span><span class="p">.</span><span class="nx">left</span> <span class="o">+</span> <span class="nx">toNumber</span><span class="p">(</span><span class="nx">constrainBorders</span><span class="p">[</span><span class="nx">BORDER_LEFT_WIDTH</span><span class="p">]));</span>
			<span class="nx">rightDiff</span> <span class="o">=</span> <span class="p">(</span><span class="nx">constrainRegion</span><span class="p">.</span><span class="nx">right</span> <span class="o">-</span> <span class="nx">toNumber</span><span class="p">(</span><span class="nx">constrainBorders</span><span class="p">[</span><span class="nx">BORDER_RIGHT_WIDTH</span><span class="p">]))</span> <span class="o">-</span> <span class="nx">oRight</span><span class="p">;</span>
			<span class="nx">topDiff</span> <span class="o">=</span> <span class="nx">oTop</span> <span class="o">-</span> <span class="p">(</span><span class="nx">constrainRegion</span><span class="p">.</span><span class="nx">top</span> <span class="o">+</span> <span class="nx">toNumber</span><span class="p">(</span><span class="nx">constrainBorders</span><span class="p">[</span><span class="nx">BORDER_TOP_WIDTH</span><span class="p">]));</span>

			<span class="k">if</span> <span class="p">(</span><span class="nx">host</span><span class="p">.</span><span class="nx">changeLeftHandles</span> <span class="o">&amp;&amp;</span> <span class="nx">host</span><span class="p">.</span><span class="nx">changeTopHandles</span><span class="p">)</span> <span class="p">{</span>
				<span class="nx">isClosestToHeight</span> <span class="o">=</span> <span class="p">(</span><span class="nx">topDiff</span> <span class="o">&lt;</span> <span class="nx">leftDiff</span><span class="p">);</span>
			<span class="p">}</span>
			<span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="nx">host</span><span class="p">.</span><span class="nx">changeLeftHandles</span><span class="p">)</span> <span class="p">{</span>
				<span class="nx">isClosestToHeight</span> <span class="o">=</span> <span class="p">(</span><span class="nx">bottomDiff</span> <span class="o">&lt;</span> <span class="nx">leftDiff</span><span class="p">);</span>
			<span class="p">}</span>
			<span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="nx">host</span><span class="p">.</span><span class="nx">changeTopHandles</span><span class="p">)</span> <span class="p">{</span>
				<span class="nx">isClosestToHeight</span> <span class="o">=</span> <span class="p">(</span><span class="nx">topDiff</span> <span class="o">&lt;</span> <span class="nx">rightDiff</span><span class="p">);</span>
			<span class="p">}</span>
			<span class="k">else</span> <span class="p">{</span>
				<span class="nx">isClosestToHeight</span> <span class="o">=</span> <span class="p">(</span><span class="nx">bottomDiff</span> <span class="o">&lt;</span> <span class="nx">rightDiff</span><span class="p">);</span>
			<span class="p">}</span>
		<span class="p">}</span>

		<span class="c1">// when the height of the resizable element touch the border of the constrain first</span>
		<span class="c1">// force the offsetWidth to be calculated based on the height ratio</span>
		<span class="k">if</span> <span class="p">(</span><span class="nx">isClosestToHeight</span><span class="p">)</span> <span class="p">{</span>
			<span class="nx">info</span><span class="p">.</span><span class="nx">offsetWidth</span> <span class="o">=</span> <span class="nx">oWidth</span><span class="o">*</span><span class="nx">hRatio</span><span class="p">();</span>
			<span class="nx">instance</span><span class="p">.</span><span class="nx">_checkWidth</span><span class="p">();</span>
			<span class="nx">info</span><span class="p">.</span><span class="nx">offsetHeight</span> <span class="o">=</span> <span class="nx">oHeight</span><span class="o">*</span><span class="nx">wRatio</span><span class="p">();</span>
		<span class="p">}</span>
		<span class="k">else</span> <span class="p">{</span>
			<span class="nx">info</span><span class="p">.</span><span class="nx">offsetHeight</span> <span class="o">=</span> <span class="nx">oHeight</span><span class="o">*</span><span class="nx">wRatio</span><span class="p">();</span>
			<span class="nx">instance</span><span class="p">.</span><span class="nx">_checkHeight</span><span class="p">();</span>
			<span class="nx">info</span><span class="p">.</span><span class="nx">offsetWidth</span> <span class="o">=</span> <span class="nx">oWidth</span><span class="o">*</span><span class="nx">hRatio</span><span class="p">();</span>
		<span class="p">}</span>

		<span class="c1">// fixing the top on handles which are able to change top</span>
		<span class="c1">// the idea here is change the top based on how much the height has changed instead of follow the dy</span>
		<span class="k">if</span> <span class="p">(</span><span class="nx">host</span><span class="p">.</span><span class="nx">changeTopHandles</span><span class="p">)</span> <span class="p">{</span>
			<span class="nx">info</span><span class="p">.</span><span class="nx">top</span> <span class="o">=</span> <span class="nx">oTop</span> <span class="o">+</span> <span class="p">(</span><span class="nx">oHeight</span> <span class="o">-</span> <span class="nx">info</span><span class="p">.</span><span class="nx">offsetHeight</span><span class="p">);</span>
		<span class="p">}</span>

		<span class="c1">// fixing the left on handles which are able to change left</span>
		<span class="c1">// the idea here is change the left based on how much the width has changed instead of follow the dx</span>
		<span class="k">if</span> <span class="p">(</span><span class="nx">host</span><span class="p">.</span><span class="nx">changeLeftHandles</span><span class="p">)</span> <span class="p">{</span>
			<span class="nx">info</span><span class="p">.</span><span class="nx">left</span> <span class="o">=</span> <span class="nx">oLeft</span> <span class="o">+</span> <span class="p">(</span><span class="nx">oWidth</span> <span class="o">-</span> <span class="nx">info</span><span class="p">.</span><span class="nx">offsetWidth</span><span class="p">);</span>
		<span class="p">}</span>

		<span class="c1">// rounding values to avoid pixel jumpings</span>
		<span class="nx">Y</span><span class="p">.</span><span class="nx">each</span><span class="p">(</span><span class="nx">info</span><span class="p">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">value</span><span class="p">,</span> <span class="nx">key</span><span class="p">)</span> <span class="p">{</span>
			<span class="k">if</span> <span class="p">(</span><span class="nx">isNumber</span><span class="p">(</span><span class="nx">value</span><span class="p">))</span> <span class="p">{</span>
				<span class="nx">info</span><span class="p">[</span><span class="nx">key</span><span class="p">]</span> <span class="o">=</span> <span class="nb">Math</span><span class="p">.</span><span class="nx">round</span><span class="p">(</span><span class="nx">value</span><span class="p">);</span>
			<span class="p">}</span>
		<span class="p">});</span>
	<span class="p">},</span>

	<span class="cm">/**</span>
<span class="cm">	 * Check whether the resizable node is inside the constrain region.</span>
<span class="cm">	 *</span>
<span class="cm">	 * @method _checkRegion</span>
<span class="cm">	 * @protected</span>
<span class="cm">	 * @return {boolean}</span>
<span class="cm">	 */</span>
	<span class="nx">_checkRegion</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
		<span class="kd">var</span> <span class="nx">instance</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">host</span> <span class="o">=</span> <span class="nx">instance</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">HOST</span><span class="p">),</span>
			<span class="nx">region</span> <span class="o">=</span> <span class="nx">instance</span><span class="p">.</span><span class="nx">_getConstrainRegion</span><span class="p">();</span>

		<span class="k">return</span> <span class="nx">Y</span><span class="p">.</span><span class="nx">DOM</span><span class="p">.</span><span class="nx">inRegion</span><span class="p">(</span><span class="kc">null</span><span class="p">,</span> <span class="nx">region</span><span class="p">,</span> <span class="kc">true</span><span class="p">,</span> <span class="nx">host</span><span class="p">.</span><span class="nx">info</span><span class="p">);</span>
	<span class="p">},</span>

    <span class="cm">/**</span>
<span class="cm">     * Update the current values on &lt;a href=&quot;Resize.html#property_info&quot;&gt;info&lt;/a&gt;</span>
<span class="cm">     * to respect the maxWidth and minWidth.</span>
<span class="cm">     *</span>
<span class="cm">     * @method _checkWidth</span>
<span class="cm">     * @protected</span>
<span class="cm">     */</span>
	<span class="nx">_checkWidth</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
		<span class="kd">var</span> <span class="nx">instance</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">host</span> <span class="o">=</span> <span class="nx">instance</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">HOST</span><span class="p">),</span>
			<span class="nx">info</span> <span class="o">=</span> <span class="nx">host</span><span class="p">.</span><span class="nx">info</span><span class="p">,</span>
			<span class="nx">maxWidth</span> <span class="o">=</span> <span class="p">(</span><span class="nx">instance</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">MAX_WIDTH</span><span class="p">)</span> <span class="o">+</span> <span class="nx">host</span><span class="p">.</span><span class="nx">totalHSurrounding</span><span class="p">),</span>
			<span class="nx">minWidth</span> <span class="o">=</span> <span class="p">(</span><span class="nx">instance</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">MIN_WIDTH</span><span class="p">)</span> <span class="o">+</span> <span class="nx">host</span><span class="p">.</span><span class="nx">totalHSurrounding</span><span class="p">);</span>

		<span class="nx">instance</span><span class="p">.</span><span class="nx">_checkConstrain</span><span class="p">(</span><span class="nx">LEFT</span><span class="p">,</span> <span class="nx">RIGHT</span><span class="p">,</span> <span class="nx">OFFSET_WIDTH</span><span class="p">);</span>

		<span class="k">if</span> <span class="p">(</span><span class="nx">info</span><span class="p">.</span><span class="nx">offsetWidth</span> <span class="o">&lt;</span> <span class="nx">minWidth</span><span class="p">)</span> <span class="p">{</span>
			<span class="nx">host</span><span class="p">.</span><span class="nx">_checkSize</span><span class="p">(</span><span class="nx">OFFSET_WIDTH</span><span class="p">,</span> <span class="nx">minWidth</span><span class="p">);</span>
		<span class="p">}</span>

		<span class="k">if</span> <span class="p">(</span><span class="nx">info</span><span class="p">.</span><span class="nx">offsetWidth</span> <span class="o">&gt;</span> <span class="nx">maxWidth</span><span class="p">)</span> <span class="p">{</span>
			<span class="nx">host</span><span class="p">.</span><span class="nx">_checkSize</span><span class="p">(</span><span class="nx">OFFSET_WIDTH</span><span class="p">,</span> <span class="nx">maxWidth</span><span class="p">);</span>
		<span class="p">}</span>
	<span class="p">},</span>

	<span class="cm">/**</span>
<span class="cm">	 * Get the constrain region based on the &lt;code&gt;constrain&lt;/code&gt;</span>
<span class="cm">     * attribute.</span>
<span class="cm">	 *</span>
<span class="cm">	 * @method _getConstrainRegion</span>
<span class="cm">	 * @protected</span>
<span class="cm">	 * @return {Object Region}</span>
<span class="cm">	 */</span>
	<span class="nx">_getConstrainRegion</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
		<span class="kd">var</span> <span class="nx">instance</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">host</span> <span class="o">=</span> <span class="nx">instance</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">HOST</span><span class="p">),</span>
			<span class="nx">node</span> <span class="o">=</span> <span class="nx">host</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">NODE</span><span class="p">),</span>
			<span class="nx">constrain</span> <span class="o">=</span> <span class="nx">instance</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">CONSTRAIN</span><span class="p">),</span>
			<span class="nx">region</span> <span class="o">=</span> <span class="kc">null</span><span class="p">;</span>

		<span class="k">if</span> <span class="p">(</span><span class="nx">constrain</span><span class="p">)</span> <span class="p">{</span>
			<span class="k">if</span> <span class="p">(</span><span class="nx">constrain</span> <span class="o">==</span> <span class="nx">VIEW</span><span class="p">)</span> <span class="p">{</span>
				<span class="nx">region</span> <span class="o">=</span> <span class="nx">node</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">VIEWPORT_REGION</span><span class="p">);</span>
			<span class="p">}</span>
			<span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="nx">isNode</span><span class="p">(</span><span class="nx">constrain</span><span class="p">))</span> <span class="p">{</span>
				<span class="nx">region</span> <span class="o">=</span> <span class="nx">constrain</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">REGION</span><span class="p">);</span>
			<span class="p">}</span>
			<span class="k">else</span> <span class="p">{</span>
				<span class="nx">region</span> <span class="o">=</span> <span class="nx">constrain</span><span class="p">;</span>
			<span class="p">}</span>
		<span class="p">}</span>

		<span class="k">return</span> <span class="nx">region</span><span class="p">;</span>
	<span class="p">},</span>

	<span class="nx">_handleResizeAlignEvent</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>
		<span class="kd">var</span> <span class="nx">instance</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">host</span> <span class="o">=</span> <span class="nx">instance</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">HOST</span><span class="p">);</span>

		<span class="c1">// check the max/min height and locking top when these values are reach</span>
		<span class="nx">instance</span><span class="p">.</span><span class="nx">_checkHeight</span><span class="p">();</span>

		<span class="c1">// check the max/min width and locking left when these values are reach</span>
		<span class="nx">instance</span><span class="p">.</span><span class="nx">_checkWidth</span><span class="p">();</span>

		<span class="c1">// calculating the ratio, for proportionally resizing</span>
		<span class="k">if</span> <span class="p">(</span><span class="nx">instance</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">PRESEVE_RATIO</span><span class="p">))</span> <span class="p">{</span>
			<span class="nx">instance</span><span class="p">.</span><span class="nx">_checkRatio</span><span class="p">();</span>
		<span class="p">}</span>

		<span class="k">if</span> <span class="p">(</span><span class="nx">instance</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">CONSTRAIN</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="nx">instance</span><span class="p">.</span><span class="nx">_checkRegion</span><span class="p">())</span> <span class="p">{</span>
			<span class="nx">host</span><span class="p">.</span><span class="nx">info</span> <span class="o">=</span> <span class="nx">host</span><span class="p">.</span><span class="nx">lastInfo</span><span class="p">;</span>
		<span class="p">}</span>
	<span class="p">},</span>

	<span class="nx">_handleResizeStartEvent</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span>
		<span class="kd">var</span> <span class="nx">instance</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
			<span class="nx">constrain</span> <span class="o">=</span> <span class="nx">instance</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">CONSTRAIN</span><span class="p">),</span>
			<span class="nx">host</span> <span class="o">=</span> <span class="nx">instance</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="nx">HOST</span><span class="p">);</span>

		<span class="nx">instance</span><span class="p">.</span><span class="nx">constrainSurrounding</span> <span class="o">=</span> <span class="nx">host</span><span class="p">.</span><span class="nx">_getBoxSurroundingInfo</span><span class="p">(</span><span class="nx">constrain</span><span class="p">);</span>
	<span class="p">}</span>
<span class="p">});</span>

<span class="nx">Y</span><span class="p">.</span><span class="nx">namespace</span><span class="p">(</span><span class="s1">&#39;Plugin&#39;</span><span class="p">);</span>
<span class="nx">Y</span><span class="p">.</span><span class="nx">Plugin</span><span class="p">.</span><span class="nx">ResizeConstrained</span> <span class="o">=</span> <span class="nx">ResizeConstrained</span><span class="p">;</span>
</pre></div>

                    </div>
			</div>
		</div>
		<div class="yui-b">
            <div class="nav">

                    <div id="moduleList" class="module">
                        <h4>Modules</h4>
                        <ul class="content">
                                <li class=""><a href="module_align-plugin.html" title="align-plugin">align-plugin</a></li>
                                <li class=""><a href="module_anim.html" title="anim">anim</a></li>
                                <li class=""><a href="module_arraysort.html" title="arraysort">arraysort</a></li>
                                <li class=""><a href="module_async-queue.html" title="async-queue">async-queue</a></li>
                                <li class=""><a href="module_attribute.html" title="attribute">attribute</a></li>
                                <li class=""><a href="module_autocomplete.html" title="autocomplete">autocomplete</a></li>
                                <li class=""><a href="module_base.html" title="base">base</a></li>
                                <li class=""><a href="module_cache.html" title="cache">cache</a></li>
                                <li class=""><a href="module_charts.html" title="charts">charts</a></li>
                                <li class=""><a href="module_classnamemanager.html" title="classnamemanager">classnamemanager</a></li>
                                <li class=""><a href="module_collection.html" title="collection">collection</a></li>
                                <li class=""><a href="module_console.html" title="console">console</a></li>
                                <li class=""><a href="module_console-filters.html" title="console-filters">console-filters</a></li>
                                <li class=""><a href="module_cookie.html" title="cookie">cookie</a></li>
                                <li class=""><a href="module_dataschema.html" title="dataschema">dataschema</a></li>
                                <li class=""><a href="module_datasource.html" title="datasource">datasource</a></li>
                                <li class=""><a href="module_datatable.html" title="datatable">datatable</a></li>
                                <li class=""><a href="module_datatype.html" title="datatype">datatype</a></li>
                                <li class=""><a href="module_dd.html" title="dd">dd</a></li>
                                <li class=""><a href="module_dial.html" title="dial">dial</a></li>
                                <li class=""><a href="module_dom.html" title="dom">dom</a></li>
                                <li class=""><a href="module_dump.html" title="dump">dump</a></li>
                                <li class=""><a href="module_editor.html" title="editor">editor</a></li>
                                <li class=""><a href="module_escape.html" title="escape">escape</a></li>
                                <li class=""><a href="module_event.html" title="event">event</a></li>
                                <li class=""><a href="module_event-custom.html" title="event-custom">event-custom</a></li>
                                <li class=""><a href="module_event-gestures.html" title="event-gestures">event-gestures</a></li>
                                <li class=""><a href="module_event-simulate.html" title="event-simulate">event-simulate</a></li>
                                <li class=""><a href="module_event-touch.html" title="event-touch">event-touch</a></li>
                                <li class=""><a href="module_event-valuechange.html" title="event-valuechange">event-valuechange</a></li>
                                <li class=""><a href="module_highlight.html" title="highlight">highlight</a></li>
                                <li class=""><a href="module_history.html" title="history">history</a></li>
                                <li class=""><a href="module_history-deprecated.html" title="history-deprecated">history-deprecated</a></li>
                                <li class=""><a href="module_imageloader.html" title="imageloader">imageloader</a></li>
                                <li class=""><a href="module_intl.html" title="intl">intl</a></li>
                                <li class=""><a href="module_io.html" title="io">io</a></li>
                                <li class=""><a href="module_json.html" title="json">json</a></li>
                                <li class=""><a href="module_jsonp.html" title="jsonp">jsonp</a></li>
                                <li class=""><a href="module_loader.html" title="loader">loader</a></li>
                                <li class=""><a href="module_node.html" title="node">node</a></li>
                                <li class=""><a href="module_node-flick.html" title="node-flick">node-flick</a></li>
                                <li class=""><a href="module_node-focusmanager.html" title="node-focusmanager">node-focusmanager</a></li>
                                <li class=""><a href="module_node-menunav.html" title="node-menunav">node-menunav</a></li>
                                <li class=""><a href="module_oop.html" title="oop">oop</a></li>
                                <li class=""><a href="module_overlay.html" title="overlay">overlay</a></li>
                                <li class=""><a href="module_plugin.html" title="plugin">plugin</a></li>
                                <li class=""><a href="module_pluginhost.html" title="pluginhost">pluginhost</a></li>
                                <li class=""><a href="module_pluginhost-base.html" title="pluginhost-base">pluginhost-base</a></li>
                                <li class=""><a href="module_profiler.html" title="profiler">profiler</a></li>
                                <li class=""><a href="module_querystring.html" title="querystring">querystring</a></li>
                                <li class=""><a href="module_queue-promote.html" title="queue-promote">queue-promote</a></li>
                                <li class=""><a href="module_recordset.html" title="recordset">recordset</a></li>
                                <li class="selected"><a href="module_resize.html" title="resize">resize</a></li>
                                <li class=""><a href="module_scrollview.html" title="scrollview">scrollview</a></li>
                                <li class=""><a href="module_scrollview-base.html" title="scrollview-base">scrollview-base</a></li>
                                <li class=""><a href="module_scrollview-base-ie.html" title="scrollview-base-ie">scrollview-base-ie</a></li>
                                <li class=""><a href="module_scrollview-paginator.html" title="scrollview-paginator">scrollview-paginator</a></li>
                                <li class=""><a href="module_scrollview-scrollbars.html" title="scrollview-scrollbars">scrollview-scrollbars</a></li>
                                <li class=""><a href="module_shim-plugin.html" title="shim-plugin">shim-plugin</a></li>
                                <li class=""><a href="module_slider.html" title="slider">slider</a></li>
                                <li class=""><a href="module_sortable.html" title="sortable">sortable</a></li>
                                <li class=""><a href="module_stylesheet.html" title="stylesheet">stylesheet</a></li>
                                <li class=""><a href="module_substitute.html" title="substitute">substitute</a></li>
                                <li class=""><a href="module_swf.html" title="swf">swf</a></li>
                                <li class=""><a href="module_swfdetect.html" title="swfdetect">swfdetect</a></li>
                                <li class=""><a href="module_tabview.html" title="tabview">tabview</a></li>
                                <li class=""><a href="module_test.html" title="test">test</a></li>
                                <li class=""><a href="module_text.html" title="text">text</a></li>
                                <li class=""><a href="module_transition.html" title="transition">transition</a></li>
                                <li class=""><a href="module_uploader.html" title="uploader">uploader</a></li>
                                <li class=""><a href="module_widget.html" title="widget">widget</a></li>
                                <li class=""><a href="module_widget-anim.html" title="widget-anim">widget-anim</a></li>
                                <li class=""><a href="module_widget-base-ie.html" title="widget-base-ie">widget-base-ie</a></li>
                                <li class=""><a href="module_widget-child.html" title="widget-child">widget-child</a></li>
                                <li class=""><a href="module_widget-locale.html" title="widget-locale">widget-locale</a></li>
                                <li class=""><a href="module_widget-parent.html" title="widget-parent">widget-parent</a></li>
                                <li class=""><a href="module_widget-position.html" title="widget-position">widget-position</a></li>
                                <li class=""><a href="module_widget-position-align.html" title="widget-position-align">widget-position-align</a></li>
                                <li class=""><a href="module_widget-position-constrain.html" title="widget-position-constrain">widget-position-constrain</a></li>
                                <li class=""><a href="module_widget-stack.html" title="widget-stack">widget-stack</a></li>
                                <li class=""><a href="module_widget-stdmod.html" title="widget-stdmod">widget-stdmod</a></li>
                                <li class=""><a href="module_yql.html" title="yql">yql</a></li>
                                <li class=""><a href="module_yui.html" title="yui">yui</a></li>
                        </ul>
                    </div>

                    <div id="classList" class="module">
                        <h4>Classes</h4>
                        <ul class="content">
                                <li class=""><a href="Resize.html" title="Resize">Resize</a></li>
                        </ul>
                    </div>

                    <div id="fileList" class="module">
                        <h4>Files</h4>
                        <ul class="content">        
                                <li class=""><a href="resize-base.js.html" title="resize-base.js">resize-base.js</a></li>
                                <li class="selected"><a href="resize-constrain.js.html" title="resize-constrain.js">resize-constrain.js</a></li>
                                <li class=""><a href="resize-proxy.js.html" title="resize-proxy.js">resize-proxy.js</a></li>
                        </ul>
                    </div>





            </div>
		</div>
	</div>
	<div id="ft">
        <hr />
        Copyright &copy; 2011 Yahoo! Inc. All rights reserved.
	</div>
</div>
<script type="text/javascript">

    var ALL_YUI_PROPS = [{"access": "private", "host": "Resize", "name": "activeHandle", "url": "Resize.html#config_activeHandle", "type": "config"}, {"access": "", "host": "Resize", "name": "activeHandleChange", "url": "Resize.html#event_activeHandleChange", "type": "event"}, {"access": "private", "host": "Resize", "name": "activeHandleNode", "url": "Resize.html#config_activeHandleNode", "type": "config"}, {"access": "", "host": "Resize", "name": "activeHandleNodeChange", "url": "Resize.html#event_activeHandleNodeChange", "type": "event"}, {"access": "", "host": "Resize", "name": "ALL_HANDLES", "url": "Resize.html#property_ALL_HANDLES", "type": "property"}, {"access": "", "host": "Resize", "name": "autoHide", "url": "Resize.html#config_autoHide", "type": "config"}, {"access": "", "host": "Resize", "name": "autoHideChange", "url": "Resize.html#event_autoHideChange", "type": "event"}, {"access": "private", "host": "Resize", "name": "_bindDD", "url": "Resize.html#method__bindDD", "type": "method"}, {"access": "private", "host": "Resize", "name": "_bindHandle", "url": "Resize.html#method__bindHandle", "type": "method"}, {"access": "protected", "host": "Resize", "name": "bindUI", "url": "Resize.html#method_bindUI", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_buildHandle", "url": "Resize.html#method__buildHandle", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_calcResize", "url": "Resize.html#method__calcResize", "type": "method"}, {"access": "", "host": "Resize", "name": "changeHeightHandles", "url": "Resize.html#property_changeHeightHandles", "type": "property"}, {"access": "", "host": "Resize", "name": "changeLeftHandles", "url": "Resize.html#property_changeLeftHandles", "type": "property"}, {"access": "", "host": "Resize", "name": "changeTopHandles", "url": "Resize.html#property_changeTopHandles", "type": "property"}, {"access": "", "host": "Resize", "name": "changeWidthHandles", "url": "Resize.html#property_changeWidthHandles", "type": "property"}, {"access": "protected", "host": "Resize", "name": "_checkConstrain", "url": "Resize.html#method__checkConstrain", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_checkHeight", "url": "Resize.html#method__checkHeight", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_checkRatio", "url": "Resize.html#method__checkRatio", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_checkRegion", "url": "Resize.html#method__checkRegion", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_checkSize", "url": "Resize.html#method__checkSize", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_checkWidth", "url": "Resize.html#method__checkWidth", "type": "method"}, {"access": "", "host": "Resize", "name": "constrain", "url": "Resize.html#config_constrain", "type": "config"}, {"access": "", "host": "Resize", "name": "constrainChange", "url": "Resize.html#event_constrainChange", "type": "event"}, {"access": "", "host": "Resize", "name": "constrainSurrounding", "url": "Resize.html#property_constrainSurrounding", "type": "property"}, {"access": "protected", "host": "Resize", "name": "_copyStyles", "url": "Resize.html#method__copyStyles", "type": "method"}, {"access": "private", "host": "Resize", "name": "_createEvents", "url": "Resize.html#method__createEvents", "type": "method"}, {"access": "", "host": "Resize", "name": "defMinHeight", "url": "Resize.html#config_defMinHeight", "type": "config"}, {"access": "", "host": "Resize", "name": "defMinHeightChange", "url": "Resize.html#event_defMinHeightChange", "type": "event"}, {"access": "", "host": "Resize", "name": "defMinWidth", "url": "Resize.html#config_defMinWidth", "type": "config"}, {"access": "", "host": "Resize", "name": "defMinWidthChange", "url": "Resize.html#event_defMinWidthChange", "type": "event"}, {"access": "protected", "host": "Resize", "name": "_defMouseUpFn", "url": "Resize.html#method__defMouseUpFn", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_defResizeAlignFn", "url": "Resize.html#method__defResizeAlignFn", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_defResizeEndFn", "url": "Resize.html#method__defResizeEndFn", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_defResizeFn", "url": "Resize.html#method__defResizeFn", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_defResizeStartFn", "url": "Resize.html#method__defResizeStartFn", "type": "method"}, {"access": "", "host": "Resize", "name": "delegate", "url": "Resize.html#property_delegate", "type": "property"}, {"access": "protected", "host": "Resize", "name": "destructor", "url": "Resize.html#method_destructor", "type": "method"}, {"access": "", "host": "Resize", "name": "eachHandle", "url": "Resize.html#method_eachHandle", "type": "method"}, {"access": "private", "host": "Resize", "name": "_getBoxSurroundingInfo", "url": "Resize.html#method__getBoxSurroundingInfo", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_getConstrainRegion", "url": "Resize.html#method__getConstrainRegion", "type": "method"}, {"access": "private", "host": "Resize", "name": "_getInfo", "url": "Resize.html#method__getInfo", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_handleMouseUpEvent", "url": "Resize.html#method__handleMouseUpEvent", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_handleResizeAlignEvent", "url": "Resize.html#method__handleResizeAlignEvent", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_handleResizeEndEvent", "url": "Resize.html#method__handleResizeEndEvent", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_handleResizeEvent", "url": "Resize.html#method__handleResizeEvent", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_handleResizeStartEvent", "url": "Resize.html#method__handleResizeStartEvent", "type": "method"}, {"access": "", "host": "Resize", "name": "handles", "url": "Resize.html#config_handles", "type": "config"}, {"access": "", "host": "Resize", "name": "handlesChange", "url": "Resize.html#event_handlesChange", "type": "event"}, {"access": "", "host": "Resize", "name": "HANDLE_TEMPLATE", "url": "Resize.html#property_HANDLE_TEMPLATE", "type": "property"}, {"access": "protected", "host": "Resize", "name": "info", "url": "Resize.html#property_info", "type": "property"}, {"access": "protected", "host": "Resize", "name": "initializer", "url": "Resize.html#method_initializer", "type": "method"}, {"access": "protected", "host": "Resize", "name": "lastInfo", "url": "Resize.html#property_lastInfo", "type": "property"}, {"access": "", "host": "Resize", "name": "maxHeight", "url": "Resize.html#config_maxHeight", "type": "config"}, {"access": "", "host": "Resize", "name": "maxHeightChange", "url": "Resize.html#event_maxHeightChange", "type": "event"}, {"access": "", "host": "Resize", "name": "maxWidth", "url": "Resize.html#config_maxWidth", "type": "config"}, {"access": "", "host": "Resize", "name": "maxWidthChange", "url": "Resize.html#event_maxWidthChange", "type": "event"}, {"access": "", "host": "Resize", "name": "minHeight", "url": "Resize.html#config_minHeight", "type": "config"}, {"access": "", "host": "Resize", "name": "minHeightChange", "url": "Resize.html#event_minHeightChange", "type": "event"}, {"access": "", "host": "Resize", "name": "minWidth", "url": "Resize.html#config_minWidth", "type": "config"}, {"access": "", "host": "Resize", "name": "minWidthChange", "url": "Resize.html#event_minWidthChange", "type": "event"}, {"access": "", "host": "Resize", "name": "node", "url": "Resize.html#config_node", "type": "config"}, {"access": "", "host": "Resize", "name": "nodeChange", "url": "Resize.html#event_nodeChange", "type": "event"}, {"access": "", "host": "Resize", "name": "nodeSurrounding", "url": "Resize.html#property_nodeSurrounding", "type": "property"}, {"access": "protected", "host": "Resize", "name": "_onHandleMouseEnter", "url": "Resize.html#method__onHandleMouseEnter", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_onHandleMouseLeave", "url": "Resize.html#method__onHandleMouseLeave", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_onWrapperMouseEnter", "url": "Resize.html#method__onWrapperMouseEnter", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_onWrapperMouseLeave", "url": "Resize.html#method__onWrapperMouseLeave", "type": "method"}, {"access": "protected", "host": "Resize", "name": "originalInfo", "url": "Resize.html#property_originalInfo", "type": "property"}, {"access": "", "host": "Resize", "name": "preserveRatio", "url": "Resize.html#config_preserveRatio", "type": "config"}, {"access": "", "host": "Resize", "name": "preserveRatioChange", "url": "Resize.html#event_preserveRatioChange", "type": "event"}, {"access": "", "host": "Resize", "name": "proxyNode", "url": "Resize.html#config_proxyNode", "type": "config"}, {"access": "", "host": "Resize", "name": "proxyNodeChange", "url": "Resize.html#event_proxyNodeChange", "type": "event"}, {"access": "", "host": "Resize", "name": "PROXY_TEMPLATE", "url": "Resize.html#property_PROXY_TEMPLATE", "type": "property"}, {"access": "", "host": "Resize", "name": "REGEX_CHANGE_HEIGHT", "url": "Resize.html#property_REGEX_CHANGE_HEIGHT", "type": "property"}, {"access": "", "host": "Resize", "name": "REGEX_CHANGE_LEFT", "url": "Resize.html#property_REGEX_CHANGE_LEFT", "type": "property"}, {"access": "", "host": "Resize", "name": "REGEX_CHANGE_TOP", "url": "Resize.html#property_REGEX_CHANGE_TOP", "type": "property"}, {"access": "", "host": "Resize", "name": "REGEX_CHANGE_WIDTH", "url": "Resize.html#property_REGEX_CHANGE_WIDTH", "type": "property"}, {"access": "protected", "host": "Resize", "name": "renderer", "url": "Resize.html#method_renderer", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_renderHandles", "url": "Resize.html#method__renderHandles", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_renderProxy", "url": "Resize.html#method__renderProxy", "type": "method"}, {"access": "protected", "host": "Resize", "name": "renderUI", "url": "Resize.html#method_renderUI", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_resize", "url": "Resize.html#method__resize", "type": "method"}, {"access": "", "host": "Resize", "name": "resize:align", "url": "Resize.html#event_resize:align", "type": "event"}, {"access": "", "host": "Resize", "name": "resize:end", "url": "Resize.html#event_resize:end", "type": "event"}, {"access": "", "host": "Resize", "name": "resize:mouseUp", "url": "Resize.html#event_resize:mouseUp", "type": "event"}, {"access": "", "host": "Resize", "name": "resize:resize", "url": "Resize.html#event_resize:resize", "type": "event"}, {"access": "", "host": "Resize", "name": "resize:start", "url": "Resize.html#event_resize:start", "type": "event"}, {"access": "protected", "host": "Resize", "name": "_resizeAlign", "url": "Resize.html#method__resizeAlign", "type": "method"}, {"access": "", "host": "Resize", "name": "Resize.ATTRS", "url": "Resize.html#property_Resize.ATTRS", "type": "property"}, {"access": "protected", "host": "Resize", "name": "_resizeEnd", "url": "Resize.html#method__resizeEnd", "type": "method"}, {"access": "", "host": "Resize", "name": "Resize.NAME", "url": "Resize.html#property_Resize.NAME", "type": "property"}, {"access": "protected", "host": "Resize", "name": "_resizeStart", "url": "Resize.html#method__resizeStart", "type": "method"}, {"access": "", "host": "Resize", "name": "resizing", "url": "Resize.html#config_resizing", "type": "config"}, {"access": "", "host": "Resize", "name": "resizingChange", "url": "Resize.html#event_resizingChange", "type": "event"}, {"access": "protected", "host": "Resize", "name": "_setActiveHandlesUI", "url": "Resize.html#method__setActiveHandlesUI", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_setHandleFromNode", "url": "Resize.html#method__setHandleFromNode", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_setHandles", "url": "Resize.html#method__setHandles", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_setHideHandlesUI", "url": "Resize.html#method__setHideHandlesUI", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_setWrap", "url": "Resize.html#method__setWrap", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_syncProxyUI", "url": "Resize.html#method__syncProxyUI", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_syncUI", "url": "Resize.html#method__syncUI", "type": "method"}, {"access": "protected", "host": "Resize", "name": "syncUI", "url": "Resize.html#method_syncUI", "type": "method"}, {"access": "", "host": "Resize", "name": "tickX", "url": "Resize.html#config_tickX", "type": "config"}, {"access": "", "host": "Resize", "name": "tickXChange", "url": "Resize.html#event_tickXChange", "type": "event"}, {"access": "", "host": "Resize", "name": "tickY", "url": "Resize.html#config_tickY", "type": "config"}, {"access": "", "host": "Resize", "name": "tickYChange", "url": "Resize.html#event_tickYChange", "type": "event"}, {"access": "", "host": "Resize", "name": "totalHSurrounding", "url": "Resize.html#property_totalHSurrounding", "type": "property"}, {"access": "", "host": "Resize", "name": "totalVSurrounding", "url": "Resize.html#property_totalVSurrounding", "type": "property"}, {"access": "private", "host": "Resize", "name": "_updateChangeHandleInfo", "url": "Resize.html#method__updateChangeHandleInfo", "type": "method"}, {"access": "private", "host": "Resize", "name": "_updateInfo", "url": "Resize.html#method__updateInfo", "type": "method"}, {"access": "private", "host": "Resize", "name": "_updateSurroundingInfo", "url": "Resize.html#method__updateSurroundingInfo", "type": "method"}, {"access": "protected", "host": "Resize", "name": "_valueWrapper", "url": "Resize.html#method__valueWrapper", "type": "method"}, {"access": "", "host": "Resize", "name": "wrap", "url": "Resize.html#config_wrap", "type": "config"}, {"access": "", "host": "Resize", "name": "wrapChange", "url": "Resize.html#event_wrapChange", "type": "event"}, {"access": "", "host": "Resize", "name": "wrapper", "url": "Resize.html#config_wrapper", "type": "config"}, {"access": "", "host": "Resize", "name": "wrapperChange", "url": "Resize.html#event_wrapperChange", "type": "event"}, {"access": "", "host": "Resize", "name": "wrapperSurrounding", "url": "Resize.html#property_wrapperSurrounding", "type": "property"}, {"access": "", "host": "Resize", "name": "WRAP_TEMPLATE", "url": "Resize.html#property_WRAP_TEMPLATE", "type": "property"}, {"access": "", "host": "Resize", "name": "wrapTypes", "url": "Resize.html#config_wrapTypes", "type": "config"}, {"access": "", "host": "Resize", "name": "wrapTypesChange", "url": "Resize.html#event_wrapTypesChange", "type": "event"}];
</script>
</body>
</html>
